﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="Cadastros_Bolsa" Codebehind="Bolsa.aspx.cs" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<%@ Register src="../Usercontrol/wuscSeguranca.ascx" tagname="wuscSeguranca" tagprefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"> 
<head id="Head1" runat="server"> 
    <title></title> 
    <script type="text/javascript">
        function RowDblClick(sender, eventArgs) {
            sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());

        } 
    </script> 
</head> 
<body> 
    <form id="form1" runat="server"> 
    <asp:ObjectDataSource ID="ods_Bolsa" runat="server"  
        DeleteMethod="_excluir_Bolsa" InsertMethod="_inserir_Bolsa"  
        SelectMethod="_obter_Bolsa" TypeName="Banco.BD_Bolsa"  
        UpdateMethod="_atualizar_Bolsa"> 
        <DeleteParameters> 
            <asp:Parameter Name="BOLSA_ID" Type="String" /> 
        </DeleteParameters> 
        <InsertParameters> 
            <asp:Parameter Name="BOLSA_ID" Type="String" /> 
            <asp:Parameter Name="BOL_DESCRICAO" Type="String" /> 
            <asp:Parameter Name="BOL_MODALIDADE" Type="String" /> 
            <asp:Parameter Name="BOL_DESCONTOVALOR" Type="String" /> 
            <asp:Parameter Name="BOL_DESCONTOPERC" Type="String" /> 
            <asp:Parameter Name="BOL_DTVIGENCIAINCIO" Type="String" /> 
            <asp:Parameter Name="BOL_DTVIGENCIAFIM" Type="String" /> 
            <asp:Parameter Name="BOL_STEXCLUIDO" Type="String" /> 
            <asp:Parameter Name="BOL_INTEGRAL" Type="String" /> 
        </InsertParameters> 
        <SelectParameters> 
            <asp:Parameter Name="BOLSA_ID" Type="String" /> 
            <asp:Parameter Name="BOL_DESCRICAO" Type="String" /> 
            <asp:Parameter Name="BOL_MODALIDADE" Type="String" /> 
            <asp:Parameter Name="BOL_DESCONTOVALOR" Type="String" /> 
            <asp:Parameter Name="BOL_DESCONTOPERC" Type="String" /> 
            <asp:Parameter Name="BOL_DTVIGENCIAINCIO" Type="String" /> 
            <asp:Parameter Name="BOL_DTVIGENCIAFIM" Type="String" /> 
            <asp:Parameter Name="BOL_STEXCLUIDO" Type="String" /> 
            <asp:Parameter Name="BOL_INTEGRAL" Type="String" /> 
        </SelectParameters> 
        <UpdateParameters> 
            <asp:Parameter Name="BOLSA_ID" Type="String" /> 
            <asp:Parameter Name="BOL_DESCRICAO" Type="String" /> 
            <asp:Parameter Name="BOL_MODALIDADE" Type="String" /> 
            <asp:Parameter Name="BOL_DESCONTOVALOR" Type="String" /> 
            <asp:Parameter Name="BOL_DESCONTOPERC" Type="String" /> 
            <asp:Parameter Name="BOL_DTVIGENCIAINCIO" Type="String" /> 
            <asp:Parameter Name="BOL_DTVIGENCIAFIM" Type="String" /> 
            <asp:Parameter Name="BOL_STEXCLUIDO" Type="String" /> 
            <asp:Parameter Name="BOL_INTEGRAL" Type="String" /> 
        </UpdateParameters> 
    </asp:ObjectDataSource> 
    
    <asp:ObjectDataSource ID="ods_BolsaModalidade" runat="server" 
        SelectMethod="_obter_bolsa_modalidade" TypeName="Banco.BD_bolsa"></asp:ObjectDataSource>

    <uc1:wuscSeguranca ID="wuscSeguranca1" runat="server" />

    <div> 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> 
        </telerik:RadScriptManager> 
 
        <telerik:RadAjaxLoadingPanel ID="ralpGrid" runat="server" Skin="Default"> 
          </telerik:RadAjaxLoadingPanel> 
 
                 <telerik:RadAjaxPanel ID="rapGrid" runat="server" Height="480px" 
                    Width="100%" HorizontalAlign="NotSet" LoadingPanelID="ralpGrid" 
                    onajaxrequest="rapGrid_AjaxRequest"> 
 
        <telerik:RadGrid ID="rdg_Bolsa" runat="server" AutoGenerateColumns="False"  
                GridLines="None" Skin="Sunset" AllowSorting="True"  
                DataSourceID="ods_Bolsa" AllowAutomaticDeletes="True"  
                AllowAutomaticInserts="True" AllowAutomaticUpdates="True"  
                AllowFilteringByColumn="True" AllowPaging="True"  PageSize="15" Height="480px">  
                <ClientSettings> 
                    <Selecting AllowRowSelect="True" /> 
                    <ClientEvents OnRowDblClick="RowDblClick" /> 
                    <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
                </ClientSettings> 
    <MasterTableView datasourceid="ods_Bolsa" commanditemdisplay="Top" EditMode="PopUp" ClientDataKeyNames="BOLSA_ID" DataKeyNames="BOLSA_ID" > 
        <CommandItemSettings AddNewRecordText="Adicionar Novo registro"  
            ExportToCsvText="Exportar para CSV" ExportToExcelText="Exportar para Excel"  
            ExportToPdfText="Exportar para PDF" ShowExportToExcelButton="True"  
            ShowExportToPdfButton="True" RefreshText="Atualizar" /> 
        <Columns> 
            <telerik:GridBoundColumn DataField="BOLSA_ID" HeaderText="Código" FilterControlWidth="25px" ReadOnly="true"
                UniqueName="BOLSA_ID"> 
                <HeaderStyle Width="65px" /> 
                <ItemStyle Font-Size="X-Small" Width="65px" /> 
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="BOL_DESCRICAO" HeaderText="Bolsa/Desconto"  
                UniqueName="BOL_DESCRICAO"> 
                <ItemStyle  Font-Size="X-Small" /> 
            </telerik:GridBoundColumn> 
            <telerik:GridDropDownColumn DataField="BOL_MODALIDADE" UniqueName="BOL_MODALIDADE" FilterControlWidth="65px" 
                DataSourceID="ods_BolsaModalidade" HeaderText="Modalidade" 
                ListTextField="BOL_MODALIDADEDESC" ListValueField="BOL_MODALIDADE" >
                <HeaderStyle Width="110px" />
                <ItemStyle Font-Size="X-Small" Width="110px" />
            </telerik:GridDropDownColumn>            
            <telerik:GridNumericColumn AllowFiltering="False" DataField="BOL_DESCONTOVALOR" 
                DataType="System.Double" HeaderText="Desc(R$)" NumericType="Currency" 
                UniqueName="BOL_DESCONTOVALOR">
                <HeaderStyle HorizontalAlign="Center" Width="75px" />
                <ItemStyle Font-Size="X-Small" HorizontalAlign="Center" Width="75px" />
            </telerik:GridNumericColumn>
            <telerik:GridNumericColumn AllowFiltering="False" DataField="BOL_DESCONTOPERC" 
                DataType="System.Double" HeaderText="Desc(%)" NumericType="Percent" 
                UniqueName="BOL_DESCONTOPERC">
                <HeaderStyle HorizontalAlign="Center" Width="75px" />
                <ItemStyle Font-Size="X-Small" HorizontalAlign="Center" Width="75px" />
            </telerik:GridNumericColumn>
            <telerik:GridBoundColumn AllowFiltering="false" DataField="BOL_DTVIGENCIAINCIO" 
                HeaderText="Inicio" UniqueName="BOL_DTVIGENCIAINCIO">
                <HeaderStyle HorizontalAlign="Center" Width="75px" />
                <ItemStyle Font-Size="X-Small" HorizontalAlign="Center" Width="75px" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn AllowFiltering="false" DataField="BOL_DTVIGENCIAFIM" 
                HeaderText="Fim" UniqueName="BOL_DTVIGENCIAFIM">
                <HeaderStyle HorizontalAlign="Center" Width="75px" />
                <ItemStyle Font-Size="X-Small" HorizontalAlign="Center" Width="75px" />
            </telerik:GridBoundColumn>
            <telerik:GridCheckBoxColumn AllowFiltering="false" DataField="BOL_INTEGRAL" 
                HeaderText="Integral" UniqueName="BOL_INTEGRAL">
                <HeaderStyle HorizontalAlign="Center" Width="65px" />
                <ItemStyle Font-Size="X-Small" HorizontalAlign="Center" Width="65px" />
            </telerik:GridCheckBoxColumn>
            <telerik:GridCheckBoxColumn AllowFiltering="false" DataField="BOL_STEXCLUIDO" 
                HeaderText="Inativo" UniqueName="BOL_STEXCLUIDO">
                <HeaderStyle HorizontalAlign="Center" Width="65px" />
                <ItemStyle Font-Size="X-Small" HorizontalAlign="Center" Width="65px" />
            </telerik:GridCheckBoxColumn>
            <telerik:GridEditCommandColumn ButtonType="ImageButton" CancelText="" 
                EditImageUrl="../Imagens/grid_edit.png" EditText="" InsertText="" UpdateText="">
                <HeaderStyle HorizontalAlign="Center" Width="40px" />
                <ItemStyle HorizontalAlign="Center" Width="40px" />
            </telerik:GridEditCommandColumn>
            <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" 
                ConfirmDialogType="RadWindow" 
                ConfirmText="Deseja realmente excluir este registro" 
                ConfirmTitle="Exclusão de registro" ImageUrl="../Imagens/grid_delete.png" 
                Text="Delete" UniqueName="DeleteColumn">
                <HeaderStyle HorizontalAlign="Center" Width="40px" />
                <ItemStyle HorizontalAlign="Center" Width="40px" />
            </telerik:GridButtonColumn>
        </Columns> 
 
    <EditFormSettings> 
    <EditColumn UniqueName="EditCommandColumn1" ButtonType="ImageButton"></EditColumn> 
        <PopUpSettings Modal="True" /> 
    </EditFormSettings> 
    </MasterTableView> 
            </telerik:RadGrid> 
        </telerik:RadAjaxPanel>
         
     
    </div> 
    </form> 
</body> 
</html> 
 
